/*
 * @Company: TWL
 * @Author: xue jian
 * @Email: xuejian@kanzhun.com
 * @Date: 2020-02-12 11:25:24
 */
#include "write_bin.h"
void write_bin(const std::string& hash, const std::string& key, const std::string& file_path) {
    std::shared_ptr<tcmcp_HulkProxyServClient> client(new tcmcp_HulkProxyServClient(META_URL, META_PATH, 1, 100000));
    if (client->init()) {
        std::cout<<"init the client fail ... "<<std::endl;
        exit(1);
    }

    std::ifstream binfile(file_path, std::ios::in | std::ios::binary);
    char buffer;
    std::string model;
    while (binfile.read(&buffer, 1)) {
        model += buffer;
    }
    binfile.close();

    client->tcmcp_hpush(hash, key, model);
    
}

